package org.kth.dks.dks_dht;

public class DHTStatistics{
    public int     numItems; 
    public int     sizeItems; 
    public int     numReplicationItems;
    public int     sizeReplicationItems;
    public DHTStatisticsItem data;

    public DHTStatistics(int ni, int si, int nri, int sri, DHTStatisticsItem data) {
	numItems = ni; 
	sizeItems = si; 
	numReplicationItems = nri; 
	sizeReplicationItems = sri;
	this.data = data;
    }

    public boolean equals(Object o){
	if (o==this)
	    return true;
	else if (!(o instanceof DHTStatistics))
	    return false;
	else{
	    DHTStatistics thisO = (DHTStatistics) o; 
	    return thisO.numItems  == numItems                      &&
		thisO.sizeItems   == sizeItems                      &&
		thisO.numReplicationItems   == numReplicationItems  &&
		thisO.sizeReplicationItems   == sizeReplicationItems &&
		data.equals(thisO.data); 
	}
    }
}


